<template>
	<view class="bg-white box">
		<view class="img-box z-0">
			<image :src="BASE_URL + info.image" mode="widthFix"></image>
		</view>
		<view class="padding-l-r-30 z-1" style="margin-top: -40rpx;">
			<view class="content-box padding-20 bg-white">
				<view class="fs-32 color-0 margin-b-20 fw-b">{{info.name}}</view>
				<view class="fs-24 color-80 ">{{info.content}}</view>
			</view>
            <view class="fs-30 color-0 fw-b" style="margin-top: 40rpx;margin-bottom: 20rpx">
                作品案例
            </view>
            <view>
                <view class="list-box" v-for="(item,index) in list">
                    <view class="border-radio-20">
                        <image :src="BASE_URL + item " mode="widthFix"></image>
                    </view>
                    <!-- <view style="padding : 15rpx 10rpx 20rpx;" class="fs-28 color-0">{{item.title}}</view> -->
                </view>
            </view>
		</view>
		<view class="reservation-btn-box padding-l-r-30 z-1">
			<view class="btn-box color-white fs-28 bg-43 border-radio-14" @click="goReservation">
				我要预约
			</view>
		</view>
	</view>
</template>

<script>
import $baseUrl from "@/config/index.js"
const BASE_URL = $baseUrl.baseUrl
import {decorationDetail} from '@/api/elderlySuitable'
	export default {
		data() {
			return {
                BASE_URL,
				info:{ },
                list:[  ],
                id:''
			}
		},
        onLoad(e) {
            this.id = e.id
        },
        onShow() {
            this.getDatails()
        },
		methods: {
            getDatails(){
                decorationDetail({decoration_id:this.id}).then(res=>{
                    if (res.code == 1){
                        this.info = res.data
						 this.list =res.data.images.split(',')
                    }else {
                        uni.showToast({
                            icon:'none',
                            title:res.msg
                        })
                    }
                })
            },
            goReservation(){
                uni.navigateTo({
                    url:'/pageA/elderlySuitable/reservation?id='+this.id
                })
            },
		}
	}
</script>

<style lang="scss" scoped>
	.box {
		padding-bottom: 180rpx;
	}
	.content-box {
		box-shadow: 0px 0px 14rpx 1px rgba(0,0,0,0.1);
		border-radius: 14rpx;

	}

</style>
